package com.loong.data.model;

import lombok.*;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.io.Serializable;
import java.math.BigDecimal;

/**
 * @Description:
 * @Author: hzp
 * @Date: 2021-1-2 22:28
 */
@Builder
@Setter
@Getter
@AllArgsConstructor
@NoArgsConstructor
@ToString
public class OrderItemsModel implements Serializable {
    /**
     * 订单详情id
     */
    @Id
    private Long id;
    /**
     * 商品id
     */
    @Field(type = FieldType.Keyword)
    private Long goodsSkuId;

    /**
     * 订单id
     */
    @Field(type = FieldType.Keyword)
    private Long orderId;

    /**
     * 商品购买数量
     */
    @Field
    private Integer num;

    /**
     * 商品名称
     */
    @Field
    private String goodsName;

    /**
     * 商品单价
     */
    @Field
    private BigDecimal price;

    /**
     * 商品总金额
     */
    @Field
    private BigDecimal totalPrice;

    /**
     * 商品图片地址
     */
    @Field
    private String picturePath;
}
